home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / CMPLTPAS / 87THERE.PAS next >
Pascal/Delphi Source File  |  1988-07-14  |  1KB  |  26 lines

  1. {->>>>Is87There<<<<--------------------------------------------}
  2. {                                                              }
  3. { Filename: 87THERE.SRC -- Last modified 7/13/88               }
  4. {                                                              }
  5. { This routine detects the presence of a math coprocessor by   }
  6. { attempting to initialize the coprocessor.  If something      }
  7. { meaningful comes back, the coprocessor is present.           }
  8. {                                                              }
  9. {     From: COMPLETE TURBO PASCAL 5.0  by Jeff Duntemann       }
  10. {    Scott, Foresman & Co., Inc. 1988   ISBN 0-673-38355-5     }
  11. {--------------------------------------------------------------}
  12.  
  13. FUNCTION Is87There : Boolean;
  14.  
  15. VAR
  16.   ControlWord : Word;
  17.  
  18. BEGIN
  19.   ControlWord := 0;  { Clear control word storage to 0 }
  20.   INLINE
  21.     ($90/$DB/$E3/                   { FNINIT }
  22.      $90/$D9/$7E/<ControlWord);     { FNSTCW ControlWord }
  23.   IF Hi(ControlWord) = 0 THEN Is87There := False
  24.     ELSE Is87There := True
  25. END;
  26.